import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import components from './components';
import http from './http';

import { isPc } from '@/utils/tools';

(function() {
  if (isPc()) document.documentElement.style.fontSize = '37.5px';
  else import('lib-flexible'); // 手机端自适应方案
})();

// 导入全局样式
import 'nprogress/nprogress.css';
import 'normalize.css';
import '@/assets/scss/common.scss'; // 自定义全局样式
// import '@/assets/scss/element-variables.scss'; // 更改element-plus变量

// 初始化应用
const app = createApp(App);


import ElementPlus from 'element-plus';
import lang from 'element-plus/lib/locale/lang/zh-cn';

app.use(ElementPlus, { locale: lang });

app.use(router).use(store).use(components).use(http).mount('#app');
